<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title></title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="robots" content="all,follow">
    <!-- Bootstrap CSS-->
    <link rel="stylesheet" href="/mall/vendor/bootstrap/css/bootstrap.min.css">
    <!-- Font Awesome CSS-->
    <link rel="stylesheet" href="/mall/vendor/font-awesome/css/font-awesome.min.css">
    <!-- Google fonts - Roboto -->
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,700">
    <!-- owl carousel-->
    <link rel="stylesheet" href="/mall/vendor/owl.carousel/assets/owl.carousel.css">
    <link rel="stylesheet" href="/mall/vendor/owl.carousel/assets/owl.theme.default.css">
    <!-- theme stylesheet-->
    <link rel="stylesheet" href="/mall/css/style.default.css" id="theme-stylesheet">
    <!-- Custom stylesheet - for your changes-->
    <link rel="stylesheet" href="/mall/css/custom.css">
    <!-- Favicon-->
    <link rel="shortcut icon" href="/mall/favicon.png">
    <!-- Tweaks for older IEs-->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script><![endif]-->
</head>

<body>
<!-- navbar-->
<header class="header mb-5" th:replace="mall/topbar::head">
</header>
<div id="all">
    <div id="content">
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <!-- breadcrumb-->
                    <nav aria-label="breadcrumb">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item"><a href="#">首页</a></li>
                            <li aria-current="page" class="breadcrumb-item active">购物车</li>
                        </ol>
                    </nav>
                </div>
                <div id="basket" class="col-lg-9" style="flex: 0 0 100%;
          max-width: 100%;">
                    <div class="box">

                        <h1>购物车</h1>
                        <div class="table-responsive">
                            <table class="table">
                                <thead>
                                <tr>
                                    <th colspan="2">商品</th>
                                    <th>数量</th>
                                    <th>单价</th>
                                    <th>总价</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr th:each="shopcar : ${shopCar}">
                                    <form method="post"
                                          th:action="@{/MallCar/UpdateCar(shopId = ${shopcar.shopCar.shopId})}">
                                        <td><a href="#"><img th:src="'/Images' + ${shopcar.goods.goodsImg}"
                                                             alt="White Blouse Armani"></a>
                                        </td>
                                        <td><a href="#" th:text="${shopcar.goods.goodsName}">White Blouse Armani</a>
                                        </td>
                                        <td>
                                            <input name="shopNumber" th:value="${shopcar.shopCar.shopNumber}"
                                                   type="number" value="2"
                                                   min="0" th:max="${shopcar.goods.goodsInventory}"
                                                   class="form-control" style="width: 70%">
                                        </td>
                                        <td th:text="${shopcar.goods.goodsPrice}">$123.00</td>
                                        <td th:text="${shopcar.shopCar.shopTotal}">$246.00</td>
                                        <td><a class="btn btn-primary"
                                               th:href="@{/MallCar/DeleteCarOfOne(shopId=${shopcar.shopCar.shopId})}"><i
                                                class="fa fa-trash-o"></i></a>
                                            <a class="btn btn-primary"
                                               th:href="@{/MallOrder/AddOrder(orderGoodsId=${shopcar.goods.goodsId})}">购买</a>
                                            <button type="submit" class="btn btn-primary">修改</button>
                                        </td>
                                    </form>
                                </tr>
                                </tbody>
                                <tfoot>
                                <tr>
                                    <th colspan="4">合计</th>
                                    <th th:text="${Total} + 元" colspan="1">$446.00</th>
                                    <td><a th:href="@{/MallCar/DeleteCarAll}"><i
                                            class="fa fa-trash-o"></i></a></td>
                                </tr>
                                </tfoot>
                            </table>
                        </div>
                        <!-- /.table-responsive-->
                        <div class="box-footer d-flex justify-content-between flex-column flex-lg-row">
                            <div class="left"><a href="/MallGoods/index" class="btn btn-outline-secondary"><i
                                    class="fa fa-chevron-left"></i>继续购物</a></div>
                            <div class="right">
                                <button type="submit" class="btn btn-primary">购买<i class="fa fa-chevron-right"></i>
                                </button>
                            </div>
                        </div>

                    </div>
                    <!-- /.box-->
                </div>
                <!-- /.col-lg-9-->

                <!-- /.col-md-3-->
            </div>
        </div>
    </div>
</div>
<!--
  *** FOOTER ***
  _________________________________________________________
  -->
<div id="footer" th:replace="mall/footerbar::foot">
</div>

<script src="/mall/vendor/jquery/jquery.min.js"></script>
<script src="/mall/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="/mall/vendor/jquery.cookie/jquery.cookie.js"></script>
<script src="/mall/vendor/owl.carousel/owl.carousel.min.js"></script>
<script src="/mall/vendor/owl.carousel2.thumbs/owl.carousel2.thumbs.js"></script>
<script src="/mall/js/front.js"></script>
</body>

</html>